import axios from '@/utils/axios';

export const getCusPage = (params) => {
    return axios.request({
        url: '/site/custom-page/page',
        method: 'get',
        params
    });
};

export const addCusPage = (data) => {
    return axios.request({
        url: '/site/custom-page/',
        method: 'post',
        data
    });
};

export const delCusPage = (data) => {
    return axios.request({
        url: '/site/custom-page/',
        method: 'delete',
        data
    });
};

export const getCusPageDetail = (siteId, pageId) => {
    return axios.request({
        url: `site/custom-page/${siteId}/${pageId}`,
        method: 'get'
    });
};

export const updateCusPageDetail = (id, data) => {
    return axios.request({
        url: `site/custom-page/${id}`,
        method: 'put',
        data
    });
};
